feat(web): configure worktree branch prefixes - #7887
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Two consistency issues in the new General → Worktree branch prefix row. Both are local to the added block.
Posted via Macroscope — UI Consistency
ApprovabilityVerdict: Skipped Macroscope did not run approvability analysis for this PR. Macroscope could not determine whether this PR modifies its approvability configuration, so the PR was not approved automatically. A PR that may change the rules that govern approval is never approved automatically. |
0251fb3 to
8baa28d
Compare
8baa28d to
2dbbca4
Compare
What Changed
t3code, accepts a normalized custom prefix, and can be left empty for unprefixed branch names.Why
Generated worktree branches were always placed under the hard-coded
t3code/namespace. Fork maintainers and teams commonly need a personal or team namespace, while some workflows require no prefix at all.This makes that namespace configurable without adding client-specific flows or changing worktree creation semantics. Existing installations remain backward compatible because
t3codeis still the default.UI Changes
Before: Settings had no branch-prefix control, and generated worktree branches always used
t3code/.After: Settings → General includes a Worktree branch prefix field with inline guidance.
Verification
mainbefore publishing.96focused tests passed across shared Git helpers, settings contracts, and the provider command reactor.git diff --checkpassed.mainand found no open upstream PR implementing it.Checklist
Built with Codex through the Codex harness in T3 Code.
Generated with Codex
Note
Medium Risk
Touches git branch rename behavior and persisted server settings. Default stays
t3code, but a bad prefix or empty prefix changes how branches are named across all clients.Overview
Adds a Worktree branch prefix server setting so generated worktree branch names are no longer hard-coded under
t3code/. Default remainst3code; empty means no prefix.The prefix is applied when the reactor promotes a temporary worktree branch after the first turn. Generated names are sanitized, existing prefixes are stripped to avoid doubling, and invalid values are rejected by the settings schema.
Settings → General gets a searchable input with reset-to-default. Temporary branch creation is unchanged.
Reviewed by Cursor Bugbot for commit 2dbbca4. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add configurable
worktreeBranchPrefixsetting for generated worktree branchesWorktreeBranchPrefixschema in settings.ts that validates either an empty string or a normalized git branch prefix (length <= 64, alphanumeric boundaries, no//). Added to bothServerSettings(default't3code') andServerSettingsPatch.buildGeneratedWorktreeBranchNamein ProviderCommandReactor.ts now accepts a caller-suppliedprefixand usessanitizeBranchFragmentto normalize it before composing the generated branch name.DraftInput-based settings row in SettingsPanels.tsx for editing the prefix, with dirty-state tracking, reset-to-default, and normalization on commit (empty if no alphanumeric characters).'t3code') instead of a hardcoded prefix; existing server settings withoutworktreeBranchPrefixwill decode to't3code'by default.Macroscope summarized 2dbbca4.